]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Animate panel appearance on startup
authorColin Walters <walters@verbum.org>
Thu, 2 Jul 2009 04:52:21 +0000 (00:52 -0400)
committerColin Walters <walters@verbum.org>
Thu, 2 Jul 2009 05:04:40 +0000 (01:04 -0400)
js/ui/main.js
js/ui/panel.js

index a9d8f073322ca256acb603953c33b3dc72622b25..603ac39f1627b8572dda007197a8793e91a189bf 100644 (file)
@@ -88,6 +88,8 @@ function start() {
         }
     });
 
+    panel.startupAnimation();
+
     let display = global.screen.get_display();
     display.connect('overlay-key', Lang.bind(overlay, overlay.toggle));
     global.connect('panel-main-menu', Lang.bind(overlay, overlay.toggle));
index a4a9390c99e69addd7dbc68f2a80a081b0f86aa7..24ac5d240ee9b7066e2d777b41b41d3d4dd27ca0 100644 (file)
@@ -7,6 +7,7 @@ const Lang = imports.lang;
 const Mainloop = imports.mainloop;
 const Meta = imports.gi.Meta;
 const Shell = imports.gi.Shell;
+const Tweener = imports.ui.tweener;
 
 const Button = imports.ui.button;
 const Main = imports.ui.main;
@@ -176,6 +177,15 @@ Panel.prototype = {
         this._updateClock();
     },
 
+    startupAnimation: function() {
+        this.actor.y = -this.actor.height;
+        Tweener.addTween(this.actor,
+                         { y: 0,
+                           time: 0.2,
+                           transition: "easeOutQuad"
+                         });
+    },
+
     _updateClock: function() {
         let displayDate = new Date();
         let msecRemaining = 60000 - (1000 * displayDate.getSeconds() +